from django.urls import path, include
from rest_framework.routers import DefaultRouter
from . import views

router = DefaultRouter()
router.register(r'projects', views.ProjectViewSet)
router.register(r'environments', views.EnvironmentViewSet)
router.register(r'interfaces', views.ApiInterfaceViewSet)
router.register(r'test_cases', views.TestCaseViewSet)
router.register(r'test_executions', views.TestExecutionViewSet)
router.register(r'test_reports', views.TestReportViewSet)

urlpatterns = [
    path('', include(router.urls)),
    path('reports/', views.ReportListView.as_view(), name='report_list'),
    path('reports/<int:pk>/', views.ReportDetailView.as_view(), name='report_detail'),
    path('reports/<int:pk>/export/<str:format>/', views.ReportExportView.as_view(), name='report_export'),
] 